<!doctype html>
<div id="start" tabindex="0" style="overflow-y: scroll; width: 150px; height: 150px">
  <a id="link" href="#" style="display: inline-block; margin-top: 150px">Link</a>
</div>
<a id="end" href="#">End</a>

<p>Search inside the focused scrollable element before searching outside of it.</p>

<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/snav-testharness.js"></script>
<script>
  var resultMap = [
    ["Down", "start"],  // Scrolled
    ["Down", "link"],
    ["Down", "end"],
  ];

  // Start at a known place.
  document.getElementById("start").focus();
  snav.assertFocusMoves(resultMap);
</script>
